<?php /*
	*/ ?>
<?php 
include("system/config.inc.php");

// IF admin is not logged in then it will redirect to the adminlogin page.
if(!isset($_SESSION['adminuserid']))
{
		
	header("location:adminlogin.php?msg=logfirst");
	die();
}
	
	if(isset($_REQUEST['orderid']) && ($_REQUEST['orderid'])!="")
		{
			$orderid=$_REQUEST['orderid'];
		}

// INSERT into database.
if(isset($_REQUEST['Submit']) && trim($_REQUEST['Submit']) == "Add comment")
{
				$orderid = $_REQUEST['orderid'];
				$title=$_REQUEST['varcomments'];
				//$desc = $_REQUEST['taxdesc'];
				$status = $_REQUEST['status'];
				if(isset($_REQUEST['notifycustomer']) && ($_REQUEST['notifycustomer'])=='on')
				{
				$notifycustomer = 1;
				}
				else{$notifycustomer=0;}
				if(isset($_SESSION['adminuserid']))
				{
					$edit=$_SESSION['adminuserid'];
				}
				//$time= date("D: H : i : s : A");
				$insert="INSERT INTO `tblorderstatushistory`
				( `intorderid` , `intorderstatusid` , `dtdateadded`, `intcustomernotify`, `varcomments`,`varedite`)
				VALUES ('$orderid', '$status', NOW(), '$notifycustomer', '$title','$edit')";
				
				$sql=$obj_db->insert($insert);				
				
				header("location:telephoneorder.php?msg=add&orderid=$orderid");
				die();
	
}	
		
// INSERT into database.
if(isset($_REQUEST['Submit2']) && trim($_REQUEST['Submit2']) == "Submit")
{
	$email = $_REQUEST['email'];
	$fname = $_REQUEST['fname'];
	$lname = $_REQUEST['lname'];
	$name=$fname.$lname;
	$company = $_REQUEST['company'];
	$add = $_REQUEST['add1'];
	$city = $_REQUEST['city'];
	$code = $_REQUEST['code'];
	$state=$_REQUEST['state'];
	$count=$_REQUEST['select'];
	$phoneno = $_REQUEST['phoneno'];
	//$faxno = $_REQUEST['faxno'];
	
	$del=mysql_query("delete from tblorders where intid=$orderid");
	
	$insert1="INSERT INTO `tblcustomers` (`charcustsex` , `varcustfname` , `varcustlname` ,`dtdob`, `varcustemail`,`varstreetname`,`varpostalcode`,`varcity`,`varstate`,`varcountry`,`varcustphone`,`varcustfax`,`varcustpassword`,`intnewsletter`,`intstatus`,`dtregtime` )
	
	VALUES ('0', '$fname', '$lname', '0000-00-00', '$email', '$add','0','0','0','0', '$phoneno', '0', '0', '0', NOW(), '1' )";
	$sql1=$obj_db->insert($insert1);
	$customerid= mysql_insert_id($obj_db->CONN);
	$insert="INSERT INTO `tblorders`
		( `intcustomerid` , `varcustomername` , `varcustomercompanyname` ,
		 `varcustomerstreetaddress`	, `varcustomercity` , `varcustomerpostcode` , 
		 `varcustomerstate` , `varcustomercountry` , `varcustomertelephone` , 
		 `varcustomeremailid` , `vardeliveryname` , 	
`vardeliverycompany`,`vardeliverystreetaddress`,`vardeliverycity`,`vardeliverypostcode`,`vardeliverystate`,`vardeliverycountry`,`varbillingname`,`varbillingcompanyname`,`varbillingstreetaddress`,`varbillingcity`,`varbillingpostcode`,`varbillingstate`,`varbillingcountry`,`varpaymentmethod`,`dtlastmodified`,`dtdateadded`,`dtpurchased`,`intcurrentorderstatus`,`dtfinished`,`varcurrency`,`deccurrencyvalue` )
	
	VALUES ('$customerid', '$name', '$company', '$add', '$city', '$code', '$state', '$count', '$phoneno', '$email', '$name','$company', '$add', '$city', '$code', '$state', '$count','$company','$company', '$add', '$city', '$code', '$state', '$count','0',NOW(),NOW(),NOW(),'1',NOW(),'0','0' )";

	$sql=$obj_db->insert($insert);
	$sqlemail = "select * from tblemails";
		$resemail = $obj_db->select($sqlemail);
		if($resemail)
		{
			$subject=$resemail[0]['varstatussub'];
			$message12=$resemail[0]['txtstatusmess'];
		}
		$sqlsett = "select * from tblmystore";
		$resset = $obj_db->select($sqlsett);
		if($resset){$frm=$resset[0]['varfromemail']; $store=$resset[0]['varstorename'];}
		$from=$frm;
		$to=$email;
		$mail_subject=$subject;
		$message=$message12;
		$headers="From:".$store;
		mail($to, $mail_subject, $message, $headers);
	$ordid= mysql_insert_id($obj_db->CONN);
	$orderid = $ordid;
		$title="Order Recived";
		//$desc = $_REQUEST['taxdesc'];
		$status = 1;
		
		$notifycustomer =3;
		$edit="Auto";
		$insert="INSERT INTO `tblorderstatushistory`
		( `intorderid` , `intorderstatusid` , `dtdateadded`, `intcustomernotify`, `varcomments`,`varedite`)
		VALUES ('$orderid', '$status', NOW(), '$notifycustomer', '$title','$edit')";
		
		$sql=$obj_db->insert($insert);	
		$insert1="INSERT INTO `tblorderstatushistory`
		( `intorderid` , `intorderstatusid` , `dtdateadded`, `intcustomernotify`, `varcomments`,`varedite`)
		VALUES ('$orderid', '$status', NOW(), '0', '$title','$edit')";
		
		$sql2=$obj_db->insert($insert1);		
	//$del=mysql_query("delete from tblorders where intid=$ordid");
	header("location:telephoneorder.php?msg=add&orderid=".$ordid);
	die();
}	
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Welcome to Duntuk- admin module</title>
<link href="css/dunt.css" rel="stylesheet" type="text/css" />
</head>


<body onload="">
<script language="javascript" src="js/orderinfo.js"></script>

<table width="80%" border="0" align="center" cellpadding="0" cellspacing="1" class="middlebackground">
  <tr>
    <td colspan="3" valign="top" align="center"><?php include(INC."top.inc.php");?></td>
  </tr>
  <tr>
    <td width="7%">&nbsp;</td>
    <td width="90%" align="center">
	<form id="orderinfo" name="orderinfo" method="post" action="">

	
	<table width="100%" border="0" cellspacing="2" cellpadding="2">
      <tr class="tblbg3">
        <td colspan="3">Orders</td>
        <td width="20%" align="center"><a Title="Click here to Go Back!" href="#"  class="indsml" onclick="history.go(-1);">Back</a></td>
      </tr>
      <tr>
        <td colspan="4"><table width="100%" border="0" cellpadding="2" cellspacing="2" class="border">
          <tr>
            <td width="33%" colspan="2" valign="top" class="font"><strong>Customer:</strong>
              <table width="100%" align="center" cellpadding="2" cellspacing="2" class="border">
                <tr class="bg1">
                  <td height="20" align="center"><strong> Add customer
                    address</strong></td>
                </tr>
                <tr >
                  <td><table  border="0" cellpadding="0" cellspacing="0">
                      <?php
			if(isset($_REQUEST['mail_add']))
			{
				$email=$_REQUEST['mail_add'];
			}
			?>
                      <tr>
                        <td align="left" class="fontsmaller">First Name : </td>
                        <td><input name="fname" type="text" class="inputtext" id="fname"/></td>
                      </tr>
                      <tr>
                        <td align="left" class="fontsmaller">Last Name : </td>
                        <td><input name="lname" type="text" class="inputtext" id="lname" size="10" /></td>
                      </tr>
                      <tr>
                        <td align="left" class="fontsmaller">E-mail</td>
                        <td><input name="email" type="text" class="inputtext" id="email" size="10" /></td>
                      </tr>
                      <tr>
                        <td align="left" class="fontsmaller">Company : </td>
                        <td><input name="company" type="text" class="inputtext" id="company" size="10" /></td>
                      </tr>
                      <tr>
                        <td align="left" class="fontsmaller"><span class="fontsmall">Street Address</span> : </td>
                        <td><input name="add1" type="text" class="inputtext" id="add1" size="10" /></td>
                      </tr>
                      <tr>
                        <td align="left" class="fontsmaller"><span class="fontsmall">City</span> : </td>
                        <td><input name="city" type="text" class="inputtext" id="city" size="10"/></td>
                      </tr>
                      <tr>
                        <td align="left" class="fontsmaller"><span class="fontsmall">Postal Code </span> : </td>
                        <td><input name="code" type="text" class="inputtext" id="code" size="10"/></td>
                      </tr>
                      <tr>
                        <td align="left" class="fontsmaller"><span class="fontsmall">State</span> : </td>
                        <!--<td><select name="add" id="add">
			    <option>No</option>
			    <option value="1">home1</option>
			    <option value="2">home2</option>
			    </select></td>-->
                        <td><input name="state" type="text" class="inputtext" id="state"	size="10"/></td>
                      </tr>
                      <tr>
                        <td align="left" class="fontsmaller">Country : </td>
                        <td><!--<select name="slt">
			    <option value="0">News Letter</option>
			    <option value="1">Subscribe</option>
			    <option value="2">Dont Subscribe</option>
			    </select>-->
                            <select name="select">
                              <?php 
	  $sql3="select * from tblcountry";
	  $res=$obj_db->select($sql3);
	  if(count($res)>0)
	  {
	  for($c=0;$c<count($res);$c++)
	  {
	  ?>
                              <option value="<?php echo $res[$c]['varcountryname'];?>">
                              <?php echo $res[$c]['varcountryname'];?>
                              </option>
                              <?php }}?>
                          </select></td>
                      </tr>
                      <tr>
                        <td align="left" class="fontsmaller">Phone : </td>
                        <td><input name="phoneno" type="text" class="inputtext" id="phoneno" size="10" /></td>
                      </tr>
                      <?php
			if(isset($_REQUEST['cell']))
			{
				$cell=$_REQUEST['cell'];
			}
			?>
                      <tr>
                        <td>&nbsp;</td>
                        <td>&nbsp;</td>
                      </tr>
                      <tr>
                        <td colspan="2" align="center"><input name="Submit2" type="submit" class="btn" id="Submit2" value="Submit" />                      </td>
                      </tr>
                  </table></td>
                </tr>
                  </table></td>
            <?php
			$orderid="";
		if(isset($_REQUEST['orderid']) && ($_REQUEST['orderid'])!="")
		{
			$orderid=$_REQUEST['orderid'];
		}
			$sql = "SELECT * FROM `tblorders` WHERE `intid`='$orderid'";
			$result = $obj_db->select($sql);
			if(count($result)>0)
			{
				for($i=0;$i<count($result);$i++)
				 { 
					$ordid=$result[$i]['intid'];
					$adddate=$result[$i]['dtdateadded'];
?>

            <td colspan="2" valign="top" class="sltimg"><strong>Shipping Address:</strong>[<a href="addcustaddress.php?action=edit&amp;orderid=<?php echo $ordid;?>" class="edit">edit</a>]
              <?php echo $result[$i]['vardeliveryname'];?>              <br />
              <?php echo $result[$i]['vardeliverycompany']; ?>
              <br />
              <?php echo $result[$i]['vardeliverystreetaddress'];?>
              <br />
              <?php echo $result[$i]['vardeliverycity']; ?>
              <br />
              <?php echo $result[$i]['vardeliverypostcode'];?>
              <br />
              <?php echo $result[$i]['vardeliverystate']; ?>
              <br />              <?php echo $result[$i]['vardeliverycountry']; ?></td>

            <td colspan="2" valign="top"><span class="font"><strong>Billing Address:</strong></span>
              <?php echo $result[$i]['varbillingname'];?>
              <br />
              <?php echo $result[$i]['varbillingcompanyname']; ?>
              <br />
              <?php echo $result[$i]['varbillingstreetaddress'];?>
              <br />
              <?php echo $result[$i]['varbillingcity']; ?>
              <br />
              <?php echo $result[$i]['varbillingpostcode'];?>
              <br />
              <?php echo $result[$i]['varbillingstate']; ?>
              <br />              <?php echo $result[$i]['varbillingcountry']; ?></td>
            </tr>
          <tr>
            <td width="15%" class="font"><strong>Telephone:</strong></td>
            <td width="16%" align="left"><?php echo $result[$i]['varcustomertelephone'];?></td>
            <td width="24%">&nbsp;</td>
            <td width="10%">&nbsp;</td>
            <td width="18%">&nbsp;</td>
            <td width="17%">&nbsp;</td>
          </tr>
          <tr>
            <td class="font"><strong>E-Mail:</strong></td>
            <td align="left"><?php echo $result[$i]['varcustomeremailid'];?></td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
        </table></td>
        </tr>
      <tr class="seprtr">
        <td colspan="4" class="fntstyle">&nbsp;</td>
        </tr>
      <tr>
        <td class="font"><strong>Shipping Method:</strong> </td>
        <td align="left">
		<?php 
		
			if(isset($_REQUEST['shiping']))	
			{
				$shipingval=$_REQUEST['shiping'];
			}
			$sqlshipping="select * from tblshippingmaster";
			$resshipping=$obj_db->select($sqlshipping);
			if(count($resshipping)>0)
			{
				for($s=0;$s<count($resshipping);$s++)
				{
					$mehodname=$resshipping[$s]['vartitle'];
					$shipid=$resshipping[$s]['intid'];
					echo $mehodname."&nbsp";
					?>
					<input name='shiping' type='radio' value='<?php echo $shipid;?><?php if($shipingval==$shipid)echo "checked"; else echo "";?>'  checked="checked" />
					<?php
					
				}
			}
			
			
		?>
        </td>
        <td width="7%">&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
	  
      <tr>
        <td width="24%" align="left" class="font"><strong>Payment Method:</strong> </td>
        <td width="49%" align="left">
		<?php 
		$paumentmethod=$result[$i]['varpaymentmethod'];
		echo $paumentmethod;
		/*$sqlpm="select * from tblpaypalsettings where intid='$paumentmethod'";
		$respm=$obj_db->select($sqlpm);
		if($respm){echo $respm[0]['varpaymentmethod'];}*/
		?></td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td colspan="4">
		<?php 
		if(isset($_REQUEST['Submit']) && ($_REQUEST['Submit'])!="")
		{
			$prodectcode=$_REQUEST['productcode'];
			$prqty=$_REQUEST['productqty'];
			$sum=0;
			$sqlpro="select * from tblproducts";
			$respr=$obj_db->select($sqlpro);
			if(count($respr)>0)
			{
				for($c=0;$c<count($respr);$c++)
				{
					$porid=$respr[$c]['intprodid'];
					$price=$respr[$c]['decprice'];
					if($prodectcode!=$porid)
					{
						
						header("location:telephoneorder.php?msg=add&orderid=$orderid");
						die();
					}
					else
					{
						$sql34="select * from tblproducts where intprodid='$porid'";
						$res34=$obj_db->select($sqlpro);
						if($res34);
						{
							$price=$res34[0]['decprice'];
							$finalprice=$price*$prqty;
							$prmodel=$res34[0]['intprodmodel'];
						}
						
						$insert1="INSERT INTO tblorderproducts( `intorderid` , `intproductid` , 
						`varproductmodel`, `varproductname`,			
						`decproductprice`,`decfinalprice`,`decimalproducttax`,`intquantity`)
				VALUES ('$ordid', '$porid', '$prmodel', '0', '$price','$finalprice','0','$prqty')";
						$insertintoop=$obj_db->insert($insert1);
						header("location:telephoneorder.php?msg=add&orderid=$orderid");
						die();
					}
				}
			}
		}
		?>
		<table width="80%" border="0" cellspacing="0" cellpadding="0">
		  <tr>
		    <td width="6%">&nbsp;</td>
			<td width="41%"><label>Add Product(Product Code) </label></td>
			<td width="3%">:</td>
			<td width="50%"><input name="productcode" type="text" id="productcode" size="10" />
			&nbsp;&nbsp;
			<input name="productqty" type="text" id="productcode" size="10" />
			</td>
		  </tr>
		  <tr>
		    <td>&nbsp;</td>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
		  </tr>
		  <tr>
		    <td colspan="4" align="center"><label>
		      <input name="Submit" type="submit" class="btn" id="Submit" value="Add product" />
		    </label></td>
		    </tr>
		</table>
		<br />
		<table width="100%" border="0" cellpadding="2" cellspacing="2" class="border">
          
          <tr align="center" class="bg1">
            <td><strong>Products</strong></td>
            <td><strong>Model</strong></td>
            <td><strong>Tax</strong></td>
            <td><strong>Price</strong></td>
            <td><strong>Total</strong></td>
          </tr>
		  <?php } ?>
		  
		  <?php 
		//$id=$result1[0]['intid'];
		$sql3 = "SELECT * FROM `tblorderproducts` WHERE `intorderid`=$orderid";
		
					//echo $sql2;
					//die();
					$sum=0;
					$result3 = $obj_db->select($sql3);
					if(count($result3)>0)
					{
						for($i3=0;$i3<count($result3);$i3++)
						 {
						 $price=$result3[$i3]['decproductprice'];
						 $prqty=$result3[$i3]['intquantity'];
						 $finalprice=$result3[$i3]['decfinalprice'];
						 $total= $price*$prqty;
						 
						 $sql_vat="select * from tbltaxrates where inttaxclassid ='3'";
						$res_vat=$obj_db->select($sql_vat);
						if($res_vat)
						{
							$vatrate=$res_vat[0]['dectaxrate'];
						}
						
						$rate=100+$vatrate;
						$actual_price=($finalprice*100)/$rate;
				
						$vat=($actual_price*$vatrate)/100;
						$sum=$sum+$total;
						$finaltotl=$sum+$vat;
						 
		  ?>
		  
          <tr align="center" class="Hralter">
            <td><?php 
			$product_id=$result3[$i3]['intproductid'];
			//echo $product_id;
			$sqlproduct="select * from tblproddesc where intid='$product_id'";
			//echo $sqlproduct;
			$resproduct=$obj_db->select($sqlproduct);
			if($resproduct)
			{
				echo $resproduct[0]['varprodname'];
			}
			?></td>
            <td><?php echo $result3[$i3]['varproductmodel'];?></td>
            <td>$<?php echo $result3[$i3]['decimalproducttax'];?></td>
            <td><span class="fntstyle">
              $<?php echo $result3[$i3]['decproductprice'];?>
            </span></td>
            <td><span class="fntstyle">
              $<?php echo $result3[$i3]['decfinalprice'];?>
            </span></td>
			<td align="center" class="fntstyle"><?php echo 	$adddate;?></td>
          </tr>
		  <?php 
				}} 
				
			?>
        </table>
		<br />
		<table width="100%" border="0" cellspacing="2" cellpadding="2">
		  <tr>
		    <td width="49%" align="center">Product Total</td>
			<td width="2%">:</td>
			<td width="49%"><?php
			if(isset($sum))
			{
			echo $sum;
			}
			?></td>
		  </tr>
		  <tr>
		    <td align="center">Shipping Rate </td>
		    <td>:</td>
		    <td>
			<?php 
			if(isset($_REQUEST['shiping']))	
			{
				$shipingval=$_REQUEST['shiping'];
				$sqlship="select * from tblshippingmaster where intid='$shipingval'";
				$resship=$obj_db->select($sqlship);
				if($resship)
				{
					$shirate=$resship[0]['decshipcost'];
					echo $shirate;
				}
			}
			?>
			</td>
		    </tr>
		  <tr>
		    <td align="center">VAT</td>
		    <td>:</td>
		    <td>
			<?php 
			if(isset($vat))
			{
			echo round($vat,2);
			}
			?></td>
		    </tr>
		  <tr>
		    <td align="center">Total Amout </td>
		    <td>:</td>
		    <td>
			<?php
			if(isset($finaltotl))
			{
				$tempto=$shirate+$finaltotl;
				echo round($tempto,2);
			} 
			?></td>
		    </tr>
		</table>

		<?php }?>
		</td>
        </tr>
      <tr>
        <td colspan="2">&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td colspan="2"><table width="100%" border="0" cellpadding="2" cellspacing="2" class="border">
          <tr align="center" class="tblbg3">
            <td>Date Added </td>
            <td>Customer Notified </td>
            <td>Status</td>
            <td>Comments</td>
          </tr>
		  
		  <?php 
		  	$sql4 = "SELECT * FROM `tblorderstatushistory` WHERE `intorderid`='$orderid'";
	
			//echo $sql2;
			//die();
			
			$result4 = $obj_db->select($sql4);
			if(count($result4)>0)
			{
				for($i4=0;$i4<count($result4);$i4++)
				 { 
		  ?>
		  
          <tr align="center" class="<?php echo ($i%2==0)?"Hrnormal":"Hralter"; ?>" onMouseOver="this.className='Hrhover';" onMouseOut="this.className='<?php echo ($i%2==0)?"Hrnormal":"Hralter"; ?>';">
            <td><?php echo printdate($result4[$i4]['dtdateadded']);?></td>
            <td><?php
			$custnotify=$result4[$i4]['intcustomernotify'];
			
			$sqlt="select * from `tblorderstatushistory` where intid='$custnotify'";
			
			$resultt = $obj_db->select($sqlt);
			
			///if(count($resultt)>0)
			{
				//for($i=0;$i<count($resultt);$i++)
				 {
			
					if($result4[$i4]['intcustomernotify']=='0')
					{
						echo "Not Notified";
					}
					else if($result4[$i4]['intcustomernotify']=='1')
					{
						echo "Notified";
					}
				}
			}

			?></td>
            
			<td><?php
			
			$stid=$result4[$i4]['intorderstatusid'];
			$sqlt="select * from `tblorderstatus` where intid='$stid'";
			
			$resultt = $obj_db->select($sqlt);
			if(count($resultt)>0)
			{
				for($i=0;$i<count($resultt);$i++)
				 {
				 	echo $resultt[$i]['varstatus'];
				 }
			}
			
			
			?></td>
            <td><?php echo $result4[$i4]['varcomments'];?></td>
          </tr>
		  <?php
		  		}
			}
		  ?>
        </table></td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
 
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr class="seprtr">
        <!--<td colspan="2"><a href="orderinfo.php?script=addtax&oid=<?php /*echo $result2[0]['intid'];*/?>" class="aa">Add Comments</a></td>-->
        <td colspan="4">&nbsp;</td>
        </tr>
   <tr>
        <td colspan="2" align="left" class="fntstyle">Comments:</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
	
 
	
      <tr>
        <td colspan="2" align="left">
          <textarea name="varcomments" cols="40" rows="06" id="varcomments"></textarea></td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td colspan="2" align="left">&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td align="left">Status :         
            <select name="status" id="status">
                    <option value="0">Select Status</option>
                    <?php 
						$sql="select * from `tblorderstatus`";
						$resman = $obj_db->select($sql);
						if(count($resman)>0)
						{
							for($m=0;$m<count($resman);$m++)
							{
								
							
					?>
					<option value="<?php echo $resman[$m]['intid'];?>"<?php if($resman[$m]['intid'] == ""){echo "selected";}else{echo "";} ?>><?php echo $resman[$m]['varstatus'];?></option>
					<?php 
							}
						}
					?>
            </select>			</td>
        <td align="left"><input name="Submit" type="submit" class="btn" id="Submit" value="Add comment" onclick="return check();"/></td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td colspan="2" align="left" class="sltimg">Notify Customer: 
          <input name="notifycustomer" type="checkbox" id="notifycustomer" value="on" checked="checked" /> 
          Append Comments 
          <input name="appcomments" type="checkbox" id="appcomments" value="on" checked="checked" /></td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
	  <tr>
        <td colspan="2">&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
	  <tr>
        <td colspan="2">&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
    </table>
<?php
	/*	}
	}
}*/
?>
	</form>
    </td>
    <td width="3%">&nbsp;</td>
  </tr>
  <tr>
    <td colspan="3" align="center">&nbsp;</td>
  </tr>
</table>

</body>
</html>
